package com.yidu.logisticssystem;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * <p>@Description: 上传文件</p>
 * <p>@author 作者/p>
 * <p>@Date: 2021/3/3</p>
 * <p>@Time: 15:39</p>
 */
@Configuration
public class UploadFileConfig implements WebMvcConfigurer {
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        // img url访问路径  file图片实际存在地址
       // 主机配置地址
        registry.addResourceHandler("/imgs/**")
                .addResourceLocations("file:D://4321//");

    }
}
